package com.itheima.service;

import com.itheima.pojo.Chat;
import com.itheima.pojo.Friend;
import com.itheima.pojo.Group;

import java.io.IOException;
import java.util.List;

public interface ChatService {


    /**
     *
     * @param groupName
     * @param userName
     * @return
     */
    Integer luanchChat(String groupName,String userName) throws IOException;

    /**
     * @param userName
     * @return
     */
    List<Group> getGroup(String userName);

    /**
     * 根据ID查询员工
     *
     * @param userName
     * @return
     */
    List<Friend> getFriend(String userName);

    /**
     * @param userName
     * @param receiverName
     * @param sendContent
     */
    void storeMsg(String userName, String receiverName, String sendContent);


    /**
     *
     * @param userName
     * @param chatName
     * @return
     */
    Chat getContentByName(String userName,String chatName);


    /**
     * @param userName
     * @param chatName
     * @return
     */
    Chat getMsg(String userName, String chatName);

    /**
     * @param friendName
     * @param userName
     * @return
     */
    Integer addFriend(String friendName, String userName);

    /**
     * @param groupName
     * @param userName
     * @return
     */
    Integer addGroup(String groupName, String userName);

    /**
     *
     * @param chatName
     * @param userName
     * @return
     */
    List<Chat> getChatLog(String chatName, String userName);
}
